package com.czx.handle;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author topaa
 * @date 2020/9/23 12:30
 */
public class IndexHandle implements InvocationHandler {

    private Object target;

    public IndexHandle(Object target) {
        this.target = target;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("代理逻辑");
        return method.invoke(target, args);
    }
}
